using System;
using System.Collections.Generic;
using System.Text;

using SlimDX;

using Barrage.Meshes;

namespace Barrage.GUI.Elements
{
    /// <summary>
    /// A Rectangle with no interaction
    /// </summary>
    public class GUIRectangle : GUIElement
    {
        /// <summary>
        /// Item constructor
        /// </summary>
        /// <param name="layout">Layout that will hold this item</param>
        /// <param name="template">Template that will be used to render this item</param>
        /// <param name="id">GUIElement identifier</param>
        /// <param name="pos">Position</param>
        /// <param name="size">Size</param>
        /// <param name="color">Color of the rectangle</param>
        public GUIRectangle(GUILayout layout,string template,string id,Vector2 pos, Vector2 size, Color4 color)
            : base(layout,template, id, new Rectangle2DMesh())
        {
            motion.Scale = new Vector3(size, 1);
            motion.Translation = new Vector3(pos, 0);
            this.Meshes[0].Materials[0].Ambient = color;
        }
    }
}
